package khet.gui;

import gggameserver.games.GGGameListener;
import gggameserver.games.GameJudge;
import gggameserver.games.Move;
import gggameserver.games.khet.Khet;
import gggameserver.games.khet.KhetBoard;

import java.awt.Container;

import javax.swing.JFrame;

public class KhetGui extends JFrame implements GGGameListener {

	public Khet khet = new Khet();
	public KhetBoard khetBoard = new KhetBoard();

	public GameJudge judge;
	public KhetGuiBoard guiBoard;

	public KhetGui() {
		super("Khet");

		this.judge = new GameJudge(this.khet.getInitialBoard(), this);

		Container cp = getContentPane();
		guiBoard = new KhetGuiBoard();
		cp.add(guiBoard);

		this.khetBoard = (KhetBoard) this.khet.getInitialBoard();
		this.guiBoard.setKhetBoard(this.khetBoard);

		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setSize(800, 600);
		setVisible(true);
	}

	// ------------------------

	public void gameMove(int player_nr) {
		// TODO Auto-generated method stub

	}

	public void gameEnd(int winner) {
		// TODO Auto-generated method stub

	}

	public void boardUpdate() {
		updateBoard();
	}

	public void beforeMove(Move move) {
		// TODO Auto-generated method stub

	}

	private void updateBoard() {
		;
	}

}
